3.425 \(\int \frac{a+b \log (c (d (e+f x)^p)^q)}{(g+h x)^2} \, dx\)

Optimal. Leaf size=80 \[ -\frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{h (g+h x)}+\frac{b f p q \log (e+f x)}{h (f g-e h)}-\frac{b f p q \log (g+h x)}{h (f g-e h)} \]

[Out]

(b*f*p*q*Log[e + f*x])/(h*(f*g - e*h)) - (a + b*Log[c*(d*(e + f*x)^p)^q])/(h*(g + h*x)) - (b*f*p*q*Log[g + h*x
])/(h*(f*g - e*h))

________________________________________________________________________________________

Rubi [A]  time = 0.0762221, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {2395, 36, 31, 2445} \[ -\frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{h (g+h x)}+\frac{b f p q \log (e+f x)}{h (f g-e h)}-\frac{b f p q \log (g+h x)}{h (f g-e h)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^2,x]

[Out]

(b*f*p*q*Log[e + f*x])/(h*(f*g - e*h)) - (a + b*Log[c*(d*(e + f*x)^p)^q])/(h*(g + h*x)) - (b*f*p*q*Log[g + h*x
])/(h*(f*g - e*h))

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^2} \, dx &=\operatorname{Subst}\left (\int \frac{a+b \log \left (c d^q (e+f x)^{p q}\right )}{(g+h x)^2} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{h (g+h x)}+\operatorname{Subst}\left (\frac{(b f p q) \int \frac{1}{(e+f x) (g+h x)} \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{h (g+h x)}-\operatorname{Subst}\left (\frac{(b f p q) \int \frac{1}{g+h x} \, dx}{f g-e h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{\left (b f^2 p q\right ) \int \frac{1}{e+f x} \, dx}{h (f g-e h)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{b f p q \log (e+f x)}{h (f g-e h)}-\frac{a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{h (g+h x)}-\frac{b f p q \log (g+h x)}{h (f g-e h)}\\ \end{align*}

Mathematica [A]  time = 0.103232, size = 69, normalized size = 0.86 \[ \frac{-\frac{a}{g+h x}-\frac{b \log \left (c \left (d (e+f x)^p\right )^q\right )}{g+h x}+\frac{b f p q (\log (e+f x)-\log (g+h x))}{f g-e h}}{h} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^2,x]

[Out]

(-(a/(g + h*x)) - (b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x) + (b*f*p*q*(Log[e + f*x] - Log[g + h*x]))/(f*g - e*h)
)/h

________________________________________________________________________________________

Maple [F]  time = 0.665, size = 0, normalized size = 0. \begin{align*} \int{\frac{a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) }{ \left ( hx+g \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g)^2,x)

[Out]

int((a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g)^2,x)

________________________________________________________________________________________

Maxima [A]  time = 1.0547, size = 122, normalized size = 1.52 \begin{align*} b f p q{\left (\frac{\log \left (f x + e\right )}{f g h - e h^{2}} - \frac{\log \left (h x + g\right )}{f g h - e h^{2}}\right )} - \frac{b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h^{2} x + g h} - \frac{a}{h^{2} x + g h} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^2,x, algorithm="maxima")

[Out]

b*f*p*q*(log(f*x + e)/(f*g*h - e*h^2) - log(h*x + g)/(f*g*h - e*h^2)) - b*log(((f*x + e)^p*d)^q*c)/(h^2*x + g*
h) - a/(h^2*x + g*h)

________________________________________________________________________________________

Fricas [A]  time = 2.31719, size = 262, normalized size = 3.28 \begin{align*} -\frac{a f g - a e h +{\left (b f g - b e h\right )} q \log \left (d\right ) -{\left (b f h p q x + b e h p q\right )} \log \left (f x + e\right ) +{\left (b f h p q x + b f g p q\right )} \log \left (h x + g\right ) +{\left (b f g - b e h\right )} \log \left (c\right )}{f g^{2} h - e g h^{2} +{\left (f g h^{2} - e h^{3}\right )} x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^2,x, algorithm="fricas")

[Out]

-(a*f*g - a*e*h + (b*f*g - b*e*h)*q*log(d) - (b*f*h*p*q*x + b*e*h*p*q)*log(f*x + e) + (b*f*h*p*q*x + b*f*g*p*q
)*log(h*x + g) + (b*f*g - b*e*h)*log(c))/(f*g^2*h - e*g*h^2 + (f*g*h^2 - e*h^3)*x)

________________________________________________________________________________________

Sympy [A]  time = 12.1688, size = 1583, normalized size = 19.79 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(d*(f*x+e)**p)**q))/(h*x+g)**2,x)

[Out]

Piecewise((-2*a*g/(2*g**2*h + 2*g*h**2*x) - b*g*p*q*log(g/h + x)/(2*g**2*h + 2*g*h**2*x) - b*g*p*q*log(-f*g/h
+ f*x)/(2*g**2*h + 2*g*h**2*x) - b*g*q*log(d)/(2*g**2*h + 2*g*h**2*x) - b*g*log(c)/(2*g**2*h + 2*g*h**2*x) - b
*h*p*q*x*log(g/h + x)/(2*g**2*h + 2*g*h**2*x) + b*h*p*q*x*log(-f*g/h + f*x)/(2*g**2*h + 2*g*h**2*x) + b*h*q*x*
log(d)/(2*g**2*h + 2*g*h**2*x) + b*h*x*log(c)/(2*g**2*h + 2*g*h**2*x), Eq(e, -f*g/h)), (-2*a*g/(3*g**2*h + 3*g
*h**2*x) + a*h*x/(3*g**2*h + 3*g*h**2*x) - 3*b*g*p*q*log(f*g/h + f*x)/(3*g**2*h + 3*g*h**2*x) - 2*b*g*p*q/(3*g
**2*h + 3*g*h**2*x) - 3*b*g*q*log(d)/(3*g**2*h + 3*g*h**2*x) - 3*b*g*log(c)/(3*g**2*h + 3*g*h**2*x) + b*h*p*q*
x/(3*g**2*h + 3*g*h**2*x), Eq(e, f*g/h)), (zoo*(a*x + b*e*p*q*log(e + f*x)/f + b*p*q*x*log(e + f*x) - b*p*q*x
+ b*q*x*log(d) + b*x*log(c)), Eq(g, -h*x)), ((a*x + b*e*p*q*log(e + f*x)/f + b*p*q*x*log(e + f*x) - b*p*q*x +
b*q*x*log(d) + b*x*log(c))/g**2, Eq(h, 0)), (-a*e**2*h**2/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2
*h**2*x) + a*e*f*g*h/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) + a*e*f*h**2*x/(e**2*g*h**3
+ e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - a*f**2*g*h*x/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2
*g**2*h**2*x) - b*e**2*h**2*p*q*log(e + f*x)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*
e**2*h**2*q*log(d)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*e**2*h**2*log(c)/(e**2*g*h
**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*e*f*g*h*p*q*log(e + f*x)/(e**2*g*h**3 + e**2*h**4*x -
f**2*g**3*h - f**2*g**2*h**2*x) + b*e*f*g*h*p*q*log(g/h + x)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g
**2*h**2*x) - b*e*f*g*h*q*log(d)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*e*f*g*h*log(
c)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*e*f*h**2*p*q*x*log(e + f*x)/(e**2*g*h**3 +
 e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) + b*e*f*h**2*p*q*x*log(g/h + x)/(e**2*g*h**3 + e**2*h**4*x - f*
*2*g**3*h - f**2*g**2*h**2*x) - b*e*f*h**2*q*x*log(d)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**
2*x) - b*e*f*h**2*x*log(c)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) + b*f**2*g**2*p*q*log(
g/h + x)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) - b*f**2*g*h*p*q*x*log(e + f*x)/(e**2*g*
h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x) + b*f**2*g*h*p*q*x*log(g/h + x)/(e**2*g*h**3 + e**2*h**4*
x - f**2*g**3*h - f**2*g**2*h**2*x) - b*f**2*g*h*q*x*log(d)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g*
*2*h**2*x) - b*f**2*g*h*x*log(c)/(e**2*g*h**3 + e**2*h**4*x - f**2*g**3*h - f**2*g**2*h**2*x), True))

________________________________________________________________________________________

Giac [A]  time = 1.29982, size = 174, normalized size = 2.17 \begin{align*} \frac{b f h p q x \log \left (f x + e\right ) - b f h p q x \log \left (h x + g\right ) + b h p q e \log \left (f x + e\right ) - b f g p q \log \left (h x + g\right ) - b f g q \log \left (d\right ) + b h q e \log \left (d\right ) - b f g \log \left (c\right ) + b h e \log \left (c\right ) - a f g + a h e}{f g h^{2} x - h^{3} x e + f g^{2} h - g h^{2} e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^2,x, algorithm="giac")

[Out]

(b*f*h*p*q*x*log(f*x + e) - b*f*h*p*q*x*log(h*x + g) + b*h*p*q*e*log(f*x + e) - b*f*g*p*q*log(h*x + g) - b*f*g
*q*log(d) + b*h*q*e*log(d) - b*f*g*log(c) + b*h*e*log(c) - a*f*g + a*h*e)/(f*g*h^2*x - h^3*x*e + f*g^2*h - g*h
^2*e)